@import (reference) 'base-zindex-levels';
@import 'colors';
@import 'trp3Vars';
@import 'trp3';
@import 'typography';
@import 'base-web';

// Some slight adjustments for smaller screen realestate
@small-breakpoint: 670px;
@tiny-breakpoint: 480px;
@micro-breakpoint: 400px;


@base-text-color: rgba(255, 255, 255, .75);
@subdued-text-color: rgba(255, 255, 255, .5);
@list-area-background-color: rgba(0, 0, 0, .2);

@step-content-area-max-width: 800px;
@step-fixed-progression-breakpoint: 500px;


@main-view-extra-spacing-top-at-small-breakpoint: @primary-input-spacing-top / 2;



@primary-input-font-size: 3.789rem;
@primary-input-height: 6rem;
@primary-input-spacing-top: 3rem;
@primary-input-spacing-bottom: 0;

.primary-font-size(@extra-base: 0) {
  font-size: @primary-input-font-size + @extra-base;

  @media (max-width: @small-breakpoint) {
    font-size: 3.2rem + @extra-base;
  }
  @media (max-width: @tiny-breakpoint) {
    font-size: 2.8rem + @extra-base;
  }
  @media (max-width: @micro-breakpoint) {
    font-size: 2.3rem + @extra-base;
  }
}


.primary-heading-font-size() {
  .primary-font-size(.45rem);
}

.community-create-associated-project-section-height(@extra-base: 0; @extra-small: 0) {
  @base-associated-project-section-height: (@org-area-total-height + @org-area-padding) + @invited-area-total-height + @invited-area-spacing-top;
  height: @base-associated-project-section-height - @extra-base;

  @media (max-width: @small-breakpoint) {
    height: @base-associated-project-section-height - @extra-base - @extra-small;
  }
}

.primary-input-font-size() {
  .primary-font-size();
}
.primary-input-height() {
  height: @primary-input-height;

  @media (max-width: @small-breakpoint) {
    height: 5.5rem;
  }
  @media (max-width: @tiny-breakpoint) {
    height: 5rem;
  }
}
.primary-input-spacing-top(@extra-base: 0; @extra-small: 0) {
  margin-top: @primary-input-spacing-top + @extra-base;

  @media (max-width: @small-breakpoint) {
    margin-top: 1.8rem + @extra-base + @extra-small;
  }
  @media (max-width: @tiny-breakpoint) {
    margin-top: 1.5rem + @extra-base + @extra-small;
  }
}

@secondary-input-font-size: 1.6rem;
@secondary-input-height: 3rem;
@secondary-input-spacing-top: 2.5rem;
@secondary-input-spacing-bottom: 2rem;

.secondary-input-spacing-top() {
  margin-top: @secondary-input-spacing-top;

  @media (max-width: @small-breakpoint) {
    margin-top: 2rem;
  }
  @media (max-width: @tiny-breakpoint) {
    margin-top: 1.5rem;
  }
}

@number-github-projects-per-row: 3;

@number-org-items-per-column: 3;
@org-item-avatar-size: 3.6rem;
@org-item-height: @org-item-avatar-size;
@org-item-spacing: 2rem;

@number-repo-items-per-column: 5;
@repo-item-avatar-size: 2rem;
@repo-item-height: @repo-item-avatar-size;

@org-area-padding: 2rem;
// 2rem but need px so we can avoid calc
@org-area-inner-width: (@step-content-area-max-width - (2 * 20px)); /*@org-area-padding*/
@org-area-total-height: (@number-org-items-per-column * @org-item-height) + (@number-org-items-per-column * @org-item-spacing);

@repo-item-spacing: (@org-area-total-height - (@number-repo-items-per-column * @repo-item-height)) / @number-repo-items-per-column;


@number-invite-user-items-per-column: 2;
@invite-user-item-avatar-size: 3.6rem;
@invite-user-item-height: @invite-user-item-avatar-size;
@invite-user-item-spacing: 2rem;
@invite-user-area-total-height: @org-area-total-height;


@people-list-item-spacing: .4rem;
@people-list-item-height: @invite-user-item-avatar-size + (2 * @people-list-item-spacing);

@invited-area-total-height: @people-list-item-height;
@invited-area-spacing-top: 2.5rem;






.community-create-root,
.community-create-app-root {
  box-sizing: border-box;

  & *,
  & *:before,
  & *:after {
    box-sizing: inherit;
  }
}

.community-create-app-root {
  z-index: @zIndexCommunityCreate;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;

  pointer-events: none;
}

.community-create-root-inner {
  width: 100%;
  height: 100%;

  opacity: 0;
  pointer-events: none;

  will-change: opacity;
  transition: opacity .2s ease;

  &.active {
    opacity: 1;
    pointer-events: auto;
  }
}

.community-create-wrapper {
  position: relative;
  width: 100%;
  height: 100%;

  background-color: #753e9c;
  background-image: url('../images/home/banner.jpg');
  background-repeat: no-repeat;
  background-size: cover;

  color: @base-text-color;

  &:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;

    background-color: rgba(0, 0, 0, 0.6);

    pointer-events: none;
  }
}

.community-create-close-button {
  // To go above the full page step containers
  z-index: 1;
  position: absolute;
  top: 0;
  right: 0;

  padding: 3rem;

  background-color: transparent;
  border: 0;

  opacity: .5;
  font-size: 3rem;

  transition: opacity .2s ease;

  &:hover {
    opacity: .9;
  }
  &:focus {
    outline: none;
    color: @jaffa;
  }

  @media (max-width: @step-fixed-progression-breakpoint) {
    padding: 2rem;
    font-size: 2rem;
  }
}

.community-create-close-button-image {
  width: 1.2em;
}


.community-create-step-root {
  width: 100%;
  height: 100%;
  pointer-events: none;

  position: absolute;
  width: 100%;
  height: 100%;
}



.community-create-step-wrapper {
  // Because of what seems to be a bug when using transform
  // that cause scrollbars but go away after causing a layout from a trivial CSS change
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  height: 100%;

  // for inline-block layout
  text-align: center;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  will-change: opacity;
  transition:
    visibility 0s ease .2s,
    opacity .2s ease;

  &.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    .community-create-root-inner & {
      pointer-events: none;
    }
    .community-create-root-inner.active & {
      pointer-events: auto;
    }

    transition:
      visibility 0s ease 0s,
      opacity .2s ease;

    & > .community-create-step-content-area {
      // This suuuucks but webkit has a bug
      // where you can't `position: fixed` inside a transformed element
      & > * {
        transform: translateX(0);
        will-change: transform;

        animation-name: community-create-step-move-in-animation;
        animation-duration: .2s;
        animation-timing-function: ease;
      }
    }
  }

  &:before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    height: 100%;
    margin-right: -0.25em;
  }

}

.community-create-step-content-area {
  display: inline-block;
  vertical-align: middle;
  // reset centering from above
  text-align: left;

  width: 75%;
  max-width: @step-content-area-max-width;
  @media (max-width: 800px) {
    width: 85%;
  }
  @media (max-width: 600px) {
    width: 90%;
  }

  padding-top: 9rem;
  padding-bottom: 3rem;

  // Sometimes the wrapper can be a form, forms.less reset :(
  margin: 0;


  @media (max-width: @step-fixed-progression-breakpoint) {
    padding-top: 5rem;
    padding-bottom: 9rem;
  }
}

@keyframes community-create-step-move-in-animation {
  from {
    transform: translateX(-200px);
  }
}


.community-create-general-link {
  color: @caribbean;
}


.primary-communtiy-create-horizontal-break {
  display: block;
  width: 100%;
  height: 0;

  background-color: 0;
  border-top: 0;
  border-bottom: 2px solid rgba(255, 255, 255, .2);
}

.primary-bare-input(@explicit-height: @primary-input-height; @font-size: @primary-input-font-size; @border-width: 3px) {
  display: block;
  width: 100%;
  height: @explicit-height;

  // Inputs are weird with height, idk
  @leftover-height: @primary-input-height - @primary-input-font-size;
  // The extra divide by 2 is so we can put on top and bottom
  @vertical-padding: ~"calc((("@leftover-height ~"-" @border-width~") / 2) / 2)";
  padding-top: @vertical-padding;
  padding-left: 0;
  padding-bottom: @vertical-padding;
  padding-right: 0;

  background-color: transparent;
  border: 0;
  border-bottom: @border-width solid @jaffa;
  box-shadow: none;
  border-radius: 0;

  color: @base-text-color;
  font-size: @font-size;
  line-height: 1;
  font-weight: 300;

  transition: border-color .2s ease;

  &:hover,
  &:focus {
    border-color: @jaffa;
  }

  &:focus {
    outline: none;
    box-shadow: none;
  }


  // Reset forms.less :(
  &:focus:required:invalid {
    color: @base-text-color;
    border-bottom-color: @ruby;
    box-shadow: none;
  }

  &:required {
    border-bottom-color: @jaffa;
  }
  &:valid {
    border-bottom-color: @caribbean;
  }
  &:invalid {
    border-bottom-color: @ruby;
  }
  &:not(:required) {
    border-bottom-color: @jaffa;
  }

  &:placeholder {
    color: @subdued-text-color;
  }

}

.secondary-bare-input() {
  .primary-bare-input(@secondary-input-height, @secondary-input-font-size, 1px);
}



.primary-community-heading {
  .primary-heading-font-size();

  max-width: 600px;
  min-height: 2em;

  color: #ffffff;
  font-weight: 300;
  line-height: 1.2;
}

.secondary-community-create-button {
  color: @subdued-text-color;
}


.primary-tabbed-navigation-list(@font-size: 3rem) {
  .primary-input-font-size();

  display: flex;

  margin-top: 0;
  margin-left: 0;
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;

  line-height: 1;
  font-weight: 300;
}

.primary-tabbed-navigation-list-item {

  &:first-child {
    & > .primary-tabbed-navigation-button {
      padding-left: 0;
    }
  }

  & + & {
    border-left: 3px solid rgba(255, 255, 255, .4);
  }
}

.primary-tabbed-navigation-button() {
  .primary-input-height();

  display: block;
  padding: 0 1em;

  background-color: transparent;
  border: 0;

  color: fade(@base-text-color, 40%);
  font-size: inherit;
  line-height: 1;
  font-family: inherit;
  font-weight: 300;

  transition:
    background-color .2s ease,
    color .2s ease;

  &:hover,
  &:focus {
    color: @base-text-color;
  }
  &:focus {
    background: rgba(255, 255, 255, .08);
    outline: none;
  }

  &.active {
    color: @ruby;
  }
}
.primary-tabbed-navigation-button {
  .primary-tabbed-navigation-button();
}





.community-create-progression-button-wrapper {
  display: flex;
  justify-content: space-between;
  align-content: center;

  margin-top: 4rem;

  @media (max-width: @step-fixed-progression-breakpoint) {
    position: fixed;
    left: 0;
    bottom: 0;

    width: 100%;
    padding: 1.5rem 2rem;

    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(44, 23, 58, 0.8) 50%
    );

    // For the chrome bug where you can't mix `position: fixed` and transform :(
    transform: unset;
  }
}

.community-create-next-button {

}
.community-create-next-button--constrained {
  .community-create-next-button();
  @media (max-width: @step-fixed-progression-breakpoint) {
    padding-left: 1.8em;
    padding-right: 1.8em;
  }
}

.community-create-back-button {
  .secondary-community-create-button();
  padding-left: 0;
}
.community-create-back-button--constrained {
  .community-create-back-button();
  @media (max-width: @step-fixed-progression-breakpoint) {
    padding-right: 1em;
  }
}






.primary-community-name-input {
  .primary-bare-input();
  .primary-input-spacing-top(0, @main-view-extra-spacing-top-at-small-breakpoint);
  .primary-input-font-size();
  .primary-input-height();

  margin-bottom: @primary-input-spacing-bottom;
}

.community-creation-slug-input-wrapper {
  .secondary-input-spacing-top();

  position: relative;
  display: flex;
  align-items: baseline;
  // aligning to baseline makes the whole thing a bit taller so just shrink this down to explicit height
  height: @secondary-input-height;
  margin-bottom: @secondary-input-spacing-bottom;

  &:after {
    content: '';

    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);

    font-family: 'fontello';

    transition: color .2s ease;
  }

  &.pending {
    &:after {
      content: '\e80b';
    }
  }
  &.available {
    &:after {
      content: '\e804';
    }
  }
  &.unavailable {
    &:after {
      content: '\e825';
      color: @ruby;
    }
  }
}

.community-creation-slug-input-prefix {
  margin-right: 0.5rem;
  font-weight: 300;
}

.community-creation-slug-input {
  .secondary-bare-input();
  flex: 1;
}

.community-creation-slug-input-icon {

}


.community-create-associated-project-section {
  .community-create-associated-project-section-height(0, @main-view-extra-spacing-top-at-small-breakpoint);
  padding-top: @org-item-height;
}

.community-create-associated-project-copy {
  display: none;
  margin: 0;

  color: @subdued-text-color;

  &.active {
    display: block;
  }
}

.community-create-has-associated-project-copy {
  .community-create-associated-project-copy();

  &.active {
    display: flex;
    align-items: baseline;
  }
}

.community-create-associated-project-main-area {
  flex: 1;
}

.community-create-associated-project-badger-option {
  display: none;

  &.active {
    display: block;
  }
}

.community-create-associated-project-badger-option-input {
  margin-right: .5rem;
}

.community-create-change-github-project-button {
  padding: 0;
}



.community-creation-sub-room-input-wrapper {
  display: flex;
  align-items: baseline;
}

.community-creation-sub-room-input-prefix {
  margin-right: .75em;
}

.community-creation-sub-room-input {
  .secondary-bare-input();
  .secondary-input-spacing-top();

  flex: 1;
  margin-bottom: @secondary-input-spacing-bottom;
}

.community-creation-sub-room-submit-button {
  padding: .5em;

  background-color: transparent;
  border: 0;

  color: inherit;
  font-size: inherit;
}




.community-create-advanced-options-button-wrapper {
  display: flex;
  justify-content: flex-end;
}

.community-create-advanced-options-button {
  .secondary-community-create-button();
  padding-right: 0;
}

.community-create-advanced-options-section {
  visibility: hidden;
  max-height: 0;

    transition:
      visibility 0s ease .2s,
      max-height .2s ease;

  &.active {
    visibility: visible;
    max-height: 999px;

    transition:
      visibility 0s ease 0s,
      max-height .2s ease;
  }
}


.community-create-github-projects-tabbed-wrapper {
  overflow: hidden;
  position: relative;
}

.community-create-github-projects-tabbed-navigation-list {
  .primary-tabbed-navigation-list();
  .primary-input-spacing-top();
  margin-bottom: @primary-input-spacing-bottom;
}

.community-create-github-projects-tab-content-area {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  transition:
    visibility 0s ease .2s,
    opacity .2s ease;

  &.active {
    position: relative;
    visibility: visible;
    opacity: 1;
    .community-create-step-wrapper & {
      pointer-events: none;
    }
    .community-create-step-wrapper.active & {
      pointer-events: auto;
    }

    transition:
      visibility 0s ease 0s,
      opacity .2s ease;
  }
}

.community-create-github-project-list-wrapper {
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;

  &::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, .2);
  }
  &:hover::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, .4);
  }
}

.community-create-github-project-list() {
  display: flex;
  flex-wrap: wrap;

  margin-top: 0;
  margin-left: 0;
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}

.loop-github-projects-list-item-max-width(@num-columns) when (@num-columns > 1) {
  // next iteration
  .loop-github-projects-list-item-max-width(@num-columns - 1);

  // Only when we can fit the appropriate number of items in (see flex-basis)
  @breakpoint-width: ((@org-area-inner-width / @num-columns) * (@num-columns - 1));
  @media (min-width: @breakpoint-width) {
    max-width: 100% / @num-columns;
  }
}

.community-create-github-project-list-item(@item-spacing) {
  @border-width: 2px;
  @vertical-padding-calc-value: (@item-spacing / 2) ~"-" @border-width;

  overflow: hidden;
  flex-grow: 1;
  // This will ensure we can have at max 2 items
  flex-basis: (@org-area-inner-width / (@number-github-projects-per-row + 1)) + 1;
  display: block;
  .loop-github-projects-list-item-max-width(@number-github-projects-per-row);

  margin-top: calc(@vertical-padding-calc-value);
  margin-bottom: calc(@vertical-padding-calc-value);

  border: @border-width solid transparent;

  transition: border-color .2s ease;

  &.active {
    background-color: rgba(255, 255, 255, .08);
    border: 2px solid fade(@ruby, 60%);
  }
}

.community-create-list-item-link {
  overflow: hidden;
  display: block;

  color: @base-text-color;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1;

  transition:
    background-color .2s ease;

  &:hover {
    background-color: rgba(255, 255, 255, .075);
    text-decoration: none;
  }
  &:focus {
    background-color: rgba(255, 255, 255, .1);
    outline: none;
  }
}

.community-create-list-item-name {
}


.community-create-org-list-root {
  .secondary-input-spacing-top();

  height: @org-area-total-height + @org-area-padding;
  //margin-top: @secondary-input-height + @secondary-input-spacing-top + @secondary-input-spacing-bottom;
  padding: (@org-area-padding - (@org-item-spacing / 2)) @org-area-padding;

  background-color: @list-area-background-color;
}
.community-create-org-list-root-inner {
  height: 100%;
}

.community-create-org-list {
  .community-create-github-project-list();
}

.community-create-org-list-item {
  .community-create-github-project-list-item(@org-item-spacing);
}

.community-create-org-list-item-link {
  .community-create-list-item-link();
}

.community-create-org-list-item-avatar {
  width: @org-item-avatar-size;
  height: @org-item-avatar-size;
  vertical-align: middle;
  margin-right: 1.6rem;

  background-color: #ffffff;
  border-radius: 4px;
}


.primary-community-repo-name-filter-input {
  .secondary-bare-input();
  .secondary-input-spacing-top();
  margin-bottom: @secondary-input-spacing-bottom;
}

.community-create-repo-list-root {
  height: @org-area-total-height + @org-area-padding;
  padding: (@org-area-padding - (@repo-item-spacing / 2)) @org-area-padding;
  background-color: @list-area-background-color;
}
.community-create-repo-list-root-inner {
  height: 100%;
}

.community-create-repo-list {
  .community-create-github-project-list();
}

.community-create-repo-list-item {
  .community-create-github-project-list-item(@repo-item-spacing);
}

.community-create-repo-list-item-link {
  .community-create-list-item-link();
}

.community-create-repo-list-item-avatar {
  width: @repo-item-avatar-size;
  height: @repo-item-avatar-size;
  vertical-align: middle;
  margin-right: .3rem;

  background-color: #ffffff;
  border-radius: 3px;
}


.community-create-org-missing-note {
  // @secondary-input-spacing-top is already used on top of org list
  @secondary-input-leftover-height: @secondary-input-height + @secondary-input-spacing-bottom;
  height: @invited-area-total-height + @secondary-input-leftover-height;
  margin-top: @invited-area-spacing-top;
  margin-bottom: 0;
}


.community-create-repo-missing-note {
  min-height: @invited-area-total-height;
  margin-top: @invited-area-spacing-top;
  margin-bottom: 0;
}

.community-invite-people-name-input {
  .primary-community-name-input();
}

.community-invite-people-email-input-wrapper {
  display: flex;
  // reset forms.less :(
  margin: 0;
  margin-top: @invited-area-spacing-top;
}

.community-invite-people-email-input {
  .secondary-bare-input();
  flex: 6;
  margin-bottom: 0;
}

.community-invite-people-email-submit-button {
  flex: 1;
  flex-shrink: 0;
  padding: 0;

  text-align: right;
}



.community-create-invite-user-result-list-root {
  .secondary-input-spacing-top();

  height: @invite-user-area-total-height + @org-area-padding;

  //margin-top: @secondary-input-height + @secondary-input-spacing-top + @secondary-input-spacing-bottom;
  padding: (@org-area-padding - (@invite-user-item-spacing / 2)) @org-area-padding;

  background-color: @list-area-background-color;
}

.community-create-invite-user-result-list-root-inner {
  height: 100%;
}

.community-create-invite-user-result-list-wrapper {
  overflow: auto;
  height: 100%;
}

.community-create-invite-user-result-list {
  display: flex;
  flex-wrap: wrap;

  margin-left: 0;
  padding-left: 0;

  list-style: none;
}

.community-create-invite-user-result-list-empty-note {
  color: @subdued-text-color;
  font-size: 1.6rem;
  font-style: italic;
}

.community-create-invite-user-result-list-item {
  @vertical-padding-calc-value: (@invite-user-item-spacing / 2);

  flex-grow: 1;
  // This will ensure we can have at max 2 items
  flex-basis: (@step-content-area-max-width / 3) + 1;
  margin-top: calc(@vertical-padding-calc-value);
  margin-bottom: calc(@vertical-padding-calc-value);
}

.community-create-invite-user-result-list-item-link {
  .community-create-list-item-link();
  display: flex;
  align-items: center;

  &:hover,
  &:focus {
    text-decoration: none;
  }
}

.community-create-invite-user-result-list-item-avatar {
  width: @invite-user-item-avatar-size;
  height: @invite-user-item-avatar-size;
  margin-right: 1rem;

  background-color: #ffffff;
  border-radius: 4px;
}




.community-create-trouble-invite-section {
  background-color: @list-area-background-color;
}

.community-create-trouble-invite-list-root {
  .community-create-invite-user-result-list-root();
  background-color: transparent;
}

.community-create-expanded-people-list-root-inner {
  .community-create-invite-user-result-list-root-inner();
}

.community-create-expanded-people-list-wrapper {
  .community-create-invite-user-result-list-wrapper();
}

.community-create-expanded-people-list {
  .community-create-invite-user-result-list();
}

.community-create-expanded-people-list-item {
  .community-create-invite-user-result-list-item();
  flex-basis: auto;
  width: 100%;
}

.community-create-expanded-people-list-item-link {
  .community-create-invite-user-result-list-item-link();
}

.community-create-expanded-people-list-item-username {
  flex: 1;
}

.community-create-expanded-people-list-item-email-input {
  .secondary-bare-input();
  flex: 1;
  width: auto;
  margin-bottom: 0;

  transition: opacity .2s ease;

  &.should-show-on-hover {
    opacity: 0;
  }

  &:hover,
  &:focus,
  .community-create-expanded-people-list-item-link:hover > &,
  .community-create-expanded-people-list-item-link:focus > & {
    opacity: 1;
  }
}

.community-create-expanded-people-list-item-status {
  padding-left: 1rem;
  padding-right: 1rem;
}

.community-create-trouble-invite-section-footer {
  .primary-input-height();
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-left: @org-area-padding;
  padding-right: @org-area-padding;

  color: @base-text-color;
}

.community-create-trouble-invite-section-footer-allow-badger-option-input {
  margin-left: 1rem;
}



.community-create-invite-list-root {
  // @secondary-input-spacing-top is already used on the invite user result list
  min-height: @people-list-item-height;
  margin-top: @invite-user-item-spacing;
}

.community-create-people-list {
  margin-left: 0;
  margin-bottom: 0;

  list-style: none;
  line-height: 1;
}

.community-create-people-list-empty-note {
  color: @subdued-text-color;
  font-size: 1.6rem;
  font-style: italic;
}

.community-create-people-list-item {
  position: relative;
  display: inline-block;
  margin: @people-list-item-spacing;

  &.pending {
    opacity: .8;

    &:after {
      content: '\e834';
      position: absolute;
      top: 0;
      right: 0;

      font-family: 'fontello';

      animation-name: community-create-people-list-item-pending-spinner-rotate;
      animation-duration: .75s;
      animation-iteration-count: infinite;
      animation-timing-function: linear;
    }
  }

  &.needs-email {
    animation-name: community-create-people-list-item-needs-email-flash;
    animation-duration: .75s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-direction: alternate;
  }

  &.pending {
    .community-create-people-list-item-remove-button {
      display: none;
    }
  }


  .community-create-people-list-item-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  &.needs-email,
  &.ready-valid-email {
    &:hover {
      .community-create-people-list-item-overlay {
        opacity: 1;
        pointer-events: auto;
      }
    }
  }

}
@keyframes community-create-people-list-item-pending-spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes community-create-people-list-item-needs-email-flash {
  from {
    opacity: .3;
  }
  to {
    opacity: .2;
  }
}

@keyframes community-create-people-list-item-pending-spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}


.community-create-people-list-item-link {
  position: relative;
  display: flex;
  align-items: center;

  &:hover,
  &:focus {
    text-decoration: none;
  }
}

.community-create-people-list-item-avatar {
  width: @invite-user-item-avatar-size;
  height: @invite-user-item-avatar-size;

  background-color: #ffffff;
  border-radius: 4px;
}

.community-create-people-list-item-remove-button-overlay {
  z-index: 1;
  position: absolute;
  top: 0;
  right: 0;
}

.community-create-people-list-item-remove-button {
  @people-list-item-remove-button-size:  3rem;
  @people-list-item-remove-button-background-color: @caribbean;
  @people-list-item-remove-button-color: #ffffff;

  width: @people-list-item-remove-button-size;
  height: @people-list-item-remove-button-size;
  padding: 0;

  background-color: fade(@people-list-item-remove-button-background-color, 60%);
  border: 0;

  color: fade(@people-list-item-remove-button-color, 60%);
  font-size: 1em;
  line-height: @people-list-item-remove-button-size;
  text-align: center;

  transform: scale(.5);
  transform-origin: top right;

  will-change: transform;
  transition:
    background-color .2s ease,
    color .2s ease,
    transform .2s ease;

  .community-create-people-list-item-link:hover &,
  .community-create-people-list-item-link:focus & {
    background-color: @people-list-item-remove-button-background-color;
    color: @people-list-item-remove-button-color;
    transform: scale(1);
  }

}

.community-create-people-list-item-overlay {
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;

  min-width: 300px;
  padding-top: 1rem;
  padding-left: calc(@invite-user-item-avatar-size + 1rem);
  padding-bottom: .6rem;
  padding-right: 1rem;

  background-color: rgba(0, 0, 0, .3);

  color: #ffffff;
}

.community-create-people-list-item-email-input {
  .secondary-bare-input();

  &:focus,
  &:invalid:focus {
    outline: none;
    box-shadow: none;
  }
}


.community-create-invite-confirmation-primary-input-stand-in {
  .primary-input-height();
  .primary-input-spacing-top();
}

.community-create-invite-confirmation-filler-area {
  .community-create-org-missing-note();
}





@overview-extra-space-section-offset: 2rem;
.community-create-overview-info-area {
  .primary-input-spacing-top();
  height: @overview-extra-space-section-offset + @primary-input-height + @primary-input-spacing-bottom + @secondary-input-height + @secondary-input-spacing-top + @secondary-input-spacing-bottom;
}

.community-create-overview-invite-area {
  height: -@overview-extra-space-section-offset + (@org-area-total-height + @org-area-padding) + @invited-area-total-height + @invited-area-spacing-top;
  padding-top: 3rem;
  border-top: 2px solid rgba(255,255,255,.2);
}

.community-create-overview-community-name {
  margin-bottom: 1.8rem;

  font-weight: 300;
  line-height: 1;
}

.community-create-overview-url-heading {
  margin-bottom: 1.2rem;

  color: fade(@base-text-color, 60%);
  font-size: 1.8rem;
  font-weight: 300;
}

.community-create-overview-github-link {
  .community-create-general-link();
  font-weight: 300;
}

.community-create-overview-invite-list-heading {
  font-weight: 300;
}

.community-create-overview-invite-list-root {
  min-height: @people-list-item-height;
  margin-top: @invite-user-item-spacing;
}

.community-create-overview-sub-room-heading {
  font-size: 2rem;
  font-weight: normal;
}

.community-create-overview-sub-room-heading-note {
  display: block;
  color: fade(@base-text-color, 40%);
  font-size: .8em;
  font-style: italic;
}

.community-create-overview-sub-room-area {
  margin-top: 2rem;
}

.community-create-sub-room-list-item-link {
  color: inherit;

  &:hover,
  &:focus {
    outline: none;
    text-decoration: none;
  }
}
